﻿@{
    ViewBag.Title = "Register";
}
<script>
    function isEmail(s) {
        var reEmail = /^.+\@@.+\..+$/;
        return reEmail.test(s)
    }

    function CanceOnclick() {
        $('#iptFirstName').val('');
        $('#iptLastName').val('');
        $('#iptEmail').val('');
        $('#iptConEmail').val('');
        $('#iptPassWord').val('');
    }

    function ValidateData() {
        if ($('#iptFirstName').val().length == 0) {
            alert('Enter your Name');
            $('#iptFirstName').focus();
            return;
        }
        if ($('#iptLastName').val().length == 0) {
            alert('Enter your Name');
            $('#iptLastName').focus();
            return;
        }
        if ($('#iptEmail').val().length == 0) {
            alert('Enter your Email Address');
            $('#iptEmail').focus();
            return;
        }
        if ($('#iptConEmail').val().length == 0) {
            alert('Enter your Email Address');
            $('#iptConEmail').focus();
            return;
        }
        if (isEmail($('#iptEmail').val()))
        { }
        else {
            alert("Please state a valid email address\nzzz@xxx.yy");
            $('#iptEmail').focus();
            return;
        }
        if (isEmail($('#iptConEmail').val()))
        { }
        else {
            alert("Please state a valid email address\nzzz@xxx.yy");
            $('#iptConEmail').focus();
            return;
        }	
        if ($('#iptEmail').val() != $('#iptConEmail').val()) {
            alert("Email addresses do not match - please re-enter!");
            $('#iptConEmail').val('');
            $('#iptConEmail').val('');
            $('#iptConEmail').focus();
        }
        if ($('#iptPassWord').val().length == 0) {
            alert('Enter password');
            $('#iptPassWord').focus();
            return;
        }
        if ($('#slCountry').val() == 'Select') {
            alert('Select your Country');
            $('#slCountry').focus();
            return;
        }
        document.forms['frmRegister'].submit();
    }
</script>
<div id="results">
    <div class="lfloat" style="width: 300px;">
        <div class="clearfix fbIndexMobile"></div>
    </div>
    <div class="_5iyz rfloat" style="width: 380px; margin-left: 0px;">
        <div class="pvl _52lp _59d-">
            <div class="mbs _52lq fsl fwb fcb">Sign Up</div>
            <div class="_52lr fsm fwn fcg">It's free and always will be.</div>
        </div>
        <div id="registration_container">
            <div>
                <div style="margin-left: 0px;" class="_58mf">
                    <div style="margin-left: 0px;" class="registration_redesign" id="reg_box">
                        <form name="reg" id="reg" method="post">
                            <div style="margin-left: 0px;" class="large_form" id="reg_form_box">
                                <div style="margin-left: 0px; margin-bottom: 10px;" class="clearfix _58mh">                                                                             
                                    <input type="text" placeholder="First Name" name="firstname" class="inputtext _58mg _5dba" style="width: 145px; margin-right: 10px;">                                                                                 
                                    <input type="text" placeholder="Last Name" name="lastname" class="inputtext _58mg _5dba" style="width:145px">                                        
                                </div>
                                <div style="margin-left: 0px; margin-bottom: 10px;" class="mbm">                                                                           
                                    <input type="text" placeholder="Your Email" name="reg_email__" class="inputtext _58mg _5dba">                                    
                                </div>
                                <div style="margin-left: 0px; margin-bottom: 10px;" id="u_0_3" class="mbm">                                                                          
                                    <input type="text" placeholder="Re-enter Email" name="reg_email_confirmation__" class="inputtext _58mg _5dba">                                    
                                </div>
                                <div style="margin-left: 0px; margin-bottom: 10px;" class="mbm">                                                                         
                                    <input type="password" placeholder="New Password" name="reg_passwd__" class="inputtext _58mg _5dba">                                    
                                </div>
                                <div style="margin-left: 0px;" class="clearfix">
                                    <button id="u_0_9" name="websubmit" class="_6j mvm _6wk _6wl _58mi _3ma _6o _6v" type="submit" style="padding: 10px 20px;">Sign Up</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
